package com.atguigu.gmall.list.feign;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.list.feign.impl.ListDegradeFeignClient;
import com.atguigu.gmall.model.list.SearchParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "service-list",fallback = ListDegradeFeignClient.class)
public interface ListFeignClient {


    //热点
    @GetMapping("/api/list/inner/hotScore/{skuId}")
    public Result hotScore(@PathVariable(name = "skuId") Long skuId);

    @PostMapping("/api/list")
    public Result list(@RequestBody SearchParam searchParam) throws Exception;
}
